<template>
  <div id="app">
    <a-config-provider :locale="zhCN">
      <BasicLayout />
    </a-config-provider>
  </div>
</template>

<script setup lang="ts">
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
dayjs.locale('zh-cn');

import BasicLayout from '@/layouts/BasicLayout.vue'
// import { healthUsingGet } from '@/api/mainController.ts'
// import {useLoginUserStore} from "@/stores/useLoginUserStore.ts";

// 已经改为在权限校验文件中获取
// const loginUserStore = useLoginUserStore()
// loginUserStore.fetchLoginUser()

// healthUsingGet().then((res) => {
//   console.log(res)
// })
</script>

<style>
/* 全局样式重置 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
}

/* 简约黑白配色方案 */
:root {
  --ant-primary-color: #000000;
  --ant-primary-color-hover: #333333;
  --ant-primary-color-active: #000000;
  --ant-primary-color-outline: rgba(0, 0, 0, 0.1);
  --ant-primary-5: rgba(0, 0, 0, 0.05);
  --ant-primary-10: rgba(0, 0, 0, 0.1);
  --ant-primary-20: rgba(0, 0, 0, 0.2);
  --ant-primary-30: rgba(0, 0, 0, 0.3);
  --ant-primary-40: rgba(0, 0, 0, 0.4);
  --ant-primary-50: rgba(0, 0, 0, 0.5);
  --ant-primary-60: rgba(0, 0, 0, 0.6);
  --ant-primary-70: rgba(0, 0, 0, 0.7);
  --ant-primary-80: rgba(0, 0, 0, 0.8);
  --ant-primary-90: rgba(0, 0, 0, 0.9);
  
  /* 简约设计变量 */
  --border-radius: 4px;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 按钮样式 - 简约风格 */
.ant-btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.2s ease;
}

.ant-btn-primary {
  background-color: #000000;
  border-color: #000000;
  box-shadow: var(--shadow-light);
}

.ant-btn-primary:hover {
  background-color: #333333;
  border-color: #333333;
  box-shadow: var(--shadow-medium);
}

.ant-btn-primary:active {
  background-color: #000000;
  border-color: #000000;
}

/* 输入框样式 - 简约风格 */
.ant-input, .ant-input-search {
  border-radius: var(--border-radius);
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.ant-input:hover, .ant-input-search:hover {
  border-color: #b0b0b0;
}

.ant-input:focus,
.ant-input-focused {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* 菜单样式 - 简约风格 */
.ant-menu {
  background: transparent;
  border: none;
}

.ant-menu-item {
  border-radius: var(--border-radius);
  margin: 2px 0;
}

.ant-menu-item-selected {
  color: #000000;
  background-color: rgba(0, 0, 0, 0.05);
}

.ant-menu-item-active:not(.ant-menu-item-disabled) {
  color: #000000;
  background-color: rgba(0, 0, 0, 0.03);
}

.ant-menu-inline .ant-menu-item-selected::after,
.ant-menu-vertical .ant-menu-item-selected::after {
  border-right-color: #000000;
}

/* 标签样式 - 简约风格 */
.ant-tag {
  background-color: #f5f5f5;
  color: #333333;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.2s ease;
}

.ant-tag:hover {
  background-color: #eeeeee;
  border-color: #d0d0d0;
}

/* 分页样式 - 简约风格 */
.ant-pagination-item {
  border-radius: var(--border-radius);
  border: 1px solid #e0e0e0;
}

.ant-pagination-item-active {
  border-color: #000000;
  background-color: #000000;
}

.ant-pagination-item-active a {
  color: #ffffff;
}

/* 表格样式 - 简约风格 */
.ant-table {
  background: transparent;
}

.ant-table-thead > tr > th {
  background-color: #fafafa;
  color: #1a1a1a;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
}

.ant-table-row:hover > td {
  background-color: #f5f5f5;
}

/* 卡片样式 - 简约风格 */
.ant-card {
  border-radius: var(--border-radius);
  border: 1px solid #f0f0f0;
  box-shadow: var(--shadow-light);
  transition: all 0.2s ease;
}

.ant-card:hover {
  box-shadow: var(--shadow-medium);
}

.ant-card-head {
  border-bottom: 1px solid #f0f0f0;
}

/* 模态框样式 - 简约风格 */
.ant-modal-content {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.ant-modal-header {
  border-bottom: 1px solid #f0f0f0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* 标签页样式 - 简约风格 */
.ant-tabs-tab {
  color: #666666;
  font-weight: 500;
  transition: all 0.2s ease;
}

.ant-tabs-tab:hover {
  color: #000000;
}

.ant-tabs-tab-active {
  color: #000000;
}

.ant-tabs-ink-bar {
  background-color: #000000;
}

/* 全局链接样式 */
a {
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #333333;
}

/* 滚动条样式 - 简约风格 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* 动画效果 - 简约风格 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 页面加载动画 */
#app {
  animation: fadeIn 0.6s ease-out;
}

/* 卡片进入动画 */
.ant-card {
  animation: fadeInUp 0.5s ease-out;
}

/* 按钮点击动画 */
.ant-btn {
  position: relative;
  overflow: hidden;
}

.ant-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ant-btn:active::before {
  width: 300px;
  height: 300px;
}

/* 输入框聚焦动画 */
.ant-input:focus,
.ant-input-focused {
  animation: scaleIn 0.2s ease-out;
}

/* 标签悬停动画 */
.ant-tag {
  transform: translateY(0);
}

.ant-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 导航项动画 */
.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #000000;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 20px;
}

/* 图片悬停动画 */
img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* 加载动画 */
.loading-text {
  animation: fadeIn 1s ease-in-out infinite alternate;
}

/* 搜索框动画 */
.search-input {
  animation: slideInUp 0.6s ease-out;
}

/* 上传区域动画 */
.picture-upload :deep(.ant-upload) {
  transition: all 0.3s ease;
}

.picture-upload :deep(.ant-upload):hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* 文字渐变动画 */
.search-title {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

/* 平滑过渡 */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
</style>
